var back=document.querySelector("#back");
var submit1=document.querySelector("#submit1");
var p1=document.querySelector(".p1");
var p2=document.querySelector(".p2");
var mima=document.querySelector("#mima");
var zhuce=document.querySelector("#zhuce");
  back.addEventListener("touchstart",function(){
				window.history.go(-1)
			})
   submit1.addEventListener("touchstart",function(e){
   	e.preventDefault();
		  var zh=document.querySelector("#zh").value;
if( zh==""){ 
     p1.style.display="block";
} 
if (zh!=""&& !(/^1[3456789]\d{9}$/.test(zh))) { 
alert("输入手机号有误");
return false;
p1.style.display="none";
 
}

var pwd=document.querySelector("#pwd").value;
if (pwd=="") {
	  p2.style.display="block";
}
if ((/^1[3456789]\d{9}$/.test(zh)) && pwd!="" && pwd.length<=6) {
alert("密码至少大于等于6位"); 
	  p2.style.display="none";
}

})
   mima.addEventListener("touchstart",function(e){
	  e.preventDefault();
	  window.location.href="forget the password.html";
})
   zhuce.addEventListener("touchstart",function(e){
   	e.preventDefault();
   	window.location.href="register.html";
   })
   
    if ('addEventListener' in document) {
            document.addEventListener('DOMContentLoaded', function() {
                FastClick.attach(document.body);
            }, false);
        }

   

   





